{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_modify %}

{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label='users' %}">Users</a>
&rsaquo; <a href="{% url 'admin:users_pendinguserregistration_changelist' %}">Pending User Registrations</a>
&rsaquo; {{ title }}
</div>
{% endblock %}

{% block content %}
<div id="content-main">
    <form method="post">
        {% csrf_token %}
        <div>
            <fieldset class="module aligned">
                <h2>Reject Registration Application</h2>
                
                <div class="form-row">
                    <div>
                        <label><strong>Email:</strong></label>
                        <p>{{ registration.email }}</p>
                    </div>
                </div>
                
                <div class="form-row">
                    <div>
                        <label><strong>Nickname:</strong></label>
                        <p>{{ registration.nickname }}</p>
                    </div>
                </div>
                
                <div class="form-row">
                    <div>
                        <label><strong>Application Time:</strong></label>
                        <p>{{ registration.created_at }}</p>
                    </div>
                </div>
                
                <div class="form-row">
                    <div>
                        <label for="id_reason"><strong>Rejection Reason:</strong></label>
                        <textarea name="reason" id="id_reason" rows="4" cols="40" placeholder="Please enter the reason for rejection (optional)"></textarea>
                        <p class="help">This reason will be stored for record keeping purposes.</p>
                    </div>
                </div>
            </fieldset>
            
            <div class="submit-row">
                <input type="submit" value="Confirm Rejection" class="default" style="background-color: #dc3545; border-color: #dc3545;">
                <p class="deletelink-box">
                    <a href="{% url 'admin:users_pendinguserregistration_changelist' %}" class="deletelink">Cancel</a>
                </p>
            </div>
        </div>
    </form>
</div>
{% endblock %}